package cn.jtcoding.gateway.auth;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author jason.tang
 * @date 2021/4/9 13:55
 * @desc 鉴权配置属性
 */

@Data
@ToString
@Component
@ConfigurationProperties(prefix = "api.auth")
public class AuthProperties {
    private Boolean enabled;

    /**
     * 前缀
     */
    private String prefix;

    /**
     * 用于确定客户端的唯一性标示符
     */
    private String accessKey;

    /**
     * 用于HMAC算法生成数字摘要
     */
    private String secretKey;

    /**
     * 过期时间，单位：秒
     */
    private Integer expiredSeconds;

    /**
     * 包含的头域
     */
    private List<String> includeHeaders;

    /**
     * 忽略的url
     */
    private List<String> ignoreUrlPatterns;
}
